<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
				"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<meta http-equiv="imagetoolbar" content="no"/>
	<meta name="description" content="JSONER 1.023"/>
	<title>JSONER 1.24 Usage Cases</title>
	<link href="css/style.css" rel="stylesheet" type="text/css"/>
	<script src="script/_compressed_jsoner.commons.js"></script>
     <script src="script/_compressed_jsoner.js"></script>
	<script src="script/jsoner.samples.js"></script>
	<script src="script/content.js"></script>
</head>

<body style="margin:10px;" >
	<div class="navheader" id="header">
		JSONER Usage Cases
	</div>
	<div id="main" class="main">
	<table>
	 <tr>
	   <td>
		   <div class="listcontainer">
			   <ul>
				   <li>
					   <a href="javascript:showSnip('code_data_1')">Defines a data used for examples bellow:</a>
		       </li>
				  </ul>
	     </div>
		   <div id="code_data_1" class="code_data">
	<pre><font class="c_4">var</font> <font class="c_1">json</font> <font class="c_2">=</font>  <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font> <font class="c_1">companyID</font><font class="c_2">:</font><font class="c_1">121</font><font class="c_2">,</font> <font class="c_1">defaultActionID</font><font class="c_2">:</font><font class="c_1">444</font><font class="c_2">,</font>
			<font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">"Stive"</font><font class="c_2">,</font> <font class="c_1">middleInitial</font><font class="c_2">:</font><font class="c_3">"Jr"</font><font class="c_2">,</font><font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">"Martin"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">address</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">city</font><font class="c_2">:</font><font class="c_3">"Albany"</font><font class="c_2">,</font><font class="c_1">state</font><font class="c_2">:</font><font class="c_3">"NY"</font><font class="c_2">,</font><font class="c_1">zipCode</font><font class="c_2">:</font><font class="c_3">"14410-585"</font><font class="c_2">,</font><font class="c_1">addreess</font><font class="c_2">:</font><font class="c_3">"41 State Street"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">job</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">departmentID</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font><font class="c_1">jobTitleID</font><font class="c_2">:</font><font class="c_1">100</font><font class="c_2">,</font><font class="c_1">hireDate</font><font class="c_2">:</font><font class="c_3">"1\/02\/2000"</font><font class="c_2">,</font><font class="c_1">terminationDate</font><font class="c_2">:</font><font class="c_3">"1\/12\/2007"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">contact</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">"12-123-2133"</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">"5656"</font><font class="c_2">,</font><font class="c_1">email1</font><font class="c_2">:</font><font class="c_3">"info@soft-amis.com"</font><font class="c_2">,</font> <font class="c_1">fax</font><font class="c_2">:</font><font class="c_3">"21-321-23223"</font><font class="c_2">,</font>
			<font class="c_1">phoneMobile</font><font class="c_2">:</font><font class="c_3">"32-434-3433"</font><font class="c_2">,</font><font class="c_1">phoneOffice</font><font class="c_2">:</font><font class="c_3">"82-900-8993"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">login</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">employeeID</font><font class="c_2">:</font><font class="c_3">"eID102"</font><font class="c_2">,</font><font class="c_1">password</font><font class="c_2">:</font><font class="c_3">"password"</font><font class="c_2">,</font><font class="c_1">superUser</font><font class="c_2">:</font><font class="c_4">true</font><font class="c_2">,</font><font class="c_1">lastLoginDate</font><font class="c_2">:</font><font class="c_3">"1\/12\/2007"</font><font class="c_2">,</font>
			<font class="c_1">text</font><font class="c_2">:</font><font class="c_3">"text"</font><font class="c_2"><font class="c_2">,</font><font class="c_1">regexp</font><font class="c_2">:</font><font class="c_3">/^mmm/</font><font class="c_2">,</font><font class="c_1">date</font><font class="c_2">:</font><font class="c_3">new Date()</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">comment</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">PCDATA</font><font class="c_2">:</font><font class="c_3">"comment"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">roles</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">}</font><font class="c_2">,</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">103</font><font class="c_2">}</font><font class="c_2">]</font>
			<font class="c_2">}</font><font class="c_2">}</font><font class="c_2">;</font></pre>

	<pre><font class="c_4">var</font> <font class="c_1">companies</font><font class="c_2">=</font><font class="c_2">{</font><font class="c_1">companies</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Oracle Corporation&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;119&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Symantec Corporation&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;120&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;SoftAMIS Corporation&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;121&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Konami Corporation&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;122&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;BEA Systems, Inc.&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;123&quot;</font><font class="c_2">}</font><font class="c_2">]</font><font class="c_2">}</font><font class="c_2">;</font></pre>

	<pre><font class="c_4">var</font> <font class="c_1">departments</font> <font class="c_2">=</font> <font class="c_2">{</font><font class="c_1">departments</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Research Department&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;101&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Software Department&quot;</font><font class="c_2">,</font><font class="c_1">id</font><font class="c_2">:</font><font class="c_3">&quot;102&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			  <font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Management Group&quot;</font><font class="c_2">,</font><font class="c_1">value</font><font class="c_2">:</font><font class="c_3">&quot;103&quot;</font><font class="c_2">}</font><font class="c_2">]</font><font class="c_2">}</font><font class="c_2">;</font></pre>

	<pre><font class="c_4">var</font> <font class="c_1">json2</font> <font class="c_2">=</font> <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">"Mickey"</font><font class="c_2">,</font> <font class="c_1">middleInitial</font><font class="c_2">:</font><font class="c_3">""</font><font class="c_2">,</font> <font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">"Mouse"</font><font class="c_2">}</font><font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">;</font></pre>

	<pre><font class="c_4">var</font> <font class="c_1">json3</font> <font class="c_2">=</font>  <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">105</font><font class="c_2">,</font> <font class="c_1">companyID</font><font class="c_2">:</font><font class="c_1">121</font><font class="c_2">,</font> <font class="c_1">defaultActionID</font><font class="c_2">:</font><font class="c_1">444</font><font class="c_2">,</font>
			<font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">"Stive"</font><font class="c_2">,</font> <font class="c_1">middleInitial</font><font class="c_2">:</font><font class="c_3">"Jr"</font><font class="c_2">,</font><font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">"Martin"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">address</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">city</font><font class="c_2">:</font><font class="c_3">"Albany"</font><font class="c_2">,</font><font class="c_1">state</font><font class="c_2">:</font><font class="c_3">"NY"</font><font class="c_2">,</font><font class="c_1">zipCode</font><font class="c_2">:</font><font class="c_3">"14410-585"</font><font class="c_2">,</font><font class="c_1">addreess</font><font class="c_2">:</font><font class="c_3">"41 State Street"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">job</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">departmentID</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font><font class="c_1">jobTitleID</font><font class="c_2">:</font><font class="c_1">100</font><font class="c_2">,</font><font class="c_1">hireDate</font><font class="c_2">:</font><font class="c_3">"1\/02\/2000"</font><font class="c_2">,</font><font class="c_1">terminationDate</font><font class="c_2">:</font><font class="c_3">"1\/12\/2007"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">contact</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">"12-123-2133"</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">"5656"</font><font class="c_2">,</font><font class="c_1">email1</font><font class="c_2">:</font><font class="c_3">"info@soft-amis.com"</font><font class="c_2">,</font> <font class="c_1">fax</font><font class="c_2">:</font><font class="c_3">"21-321-23223"</font><font class="c_2">,</font>
			<font class="c_1">phoneMobile</font><font class="c_2">:</font><font class="c_3">"32-434-3433"</font><font class="c_2">,</font><font class="c_1">phoneOffice</font><font class="c_2">:</font><font class="c_3">"82-900-8993"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">login</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">employeeID</font><font class="c_2">:</font><font class="c_3">"eID102"</font><font class="c_2">,</font><font class="c_1">password</font><font class="c_2">:</font><font class="c_3">"password"</font><font class="c_2">,</font><font class="c_1">superUser</font><font class="c_2">:</font><font class="c_4">true</font><font class="c_2">,</font><font class="c_1">lastLoginDate</font><font class="c_2">:</font><font class="c_3">"1\/12\/2007"</font><font class="c_2">,</font>
			<font class="c_1">text</font><font class="c_2">:</font><font class="c_3">"text"</font><font class="c_2"><font class="c_2">,</font><font class="c_1">regexp</font><font class="c_2">:</font><font class="c_3">/^mmm/</font><font class="c_2">,</font><font class="c_1">date</font><font class="c_2">:</font><font class="c_3">new Date()</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">comment</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">PCDATA</font><font class="c_2">:</font><font class="c_3">"comment"</font><font class="c_2">}</font><font class="c_2">,</font>
			<font class="c_1">roles</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">105</font><font class="c_2">}</font><font class="c_2">]</font>
			<font class="c_2">}</font><font class="c_2">}</font><font class="c_2">;</font><font class="c_2">}</font></pre>

	<pre><font class="c_4">var</font> <font class="c_1">items</font> <font class="c_2">=</font> <font class="c_2">{</font><font class="c_1">items</font><font class="c_2">:</font><font class="c_2">[</font>
			 <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">104</font><font class="c_2">,</font> <font class="c_1">companyID</font><font class="c_2">:</font><font class="c_1">131</font><font class="c_2">,</font>
			 <font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">&quot;Mikie&quot;</font><font class="c_2">,</font> <font class="c_1">middleInitial</font><font class="c_2">:</font><font class="c_3">&quot;Jr&quot;</font><font class="c_2">,</font><font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">&quot;Do&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">address</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">city</font><font class="c_2">:</font><font class="c_3">&quot;Albany&quot;</font><font class="c_2">,</font><font class="c_1">state</font><font class="c_2">:</font><font class="c_3">&quot;NY&quot;</font><font class="c_2">,</font><font class="c_1">zipCode</font><font class="c_2">:</font><font class="c_3">&quot;14410-585&quot;</font><font class="c_2">,</font><font class="c_1">addreess</font><font class="c_2">:</font><font class="c_3">&quot;41 State Street&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">job</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">departmentID</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font><font class="c_1">jobTitleID</font><font class="c_2">:</font><font class="c_1">100</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">contact</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">&quot;12-123-2133&quot;</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">&quot;56&quot;</font><font class="c_2">,</font> <font class="c_1">email</font><font class="c_2">:</font><font class="c_3">&quot;mike@yahoo.com&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">login</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">employeeID</font><font class="c_2">:</font><font class="c_3">&quot;eID101&quot;</font><font class="c_2">,</font><font class="c_1">password</font><font class="c_2">:</font><font class="c_3">&quot;password&quot;</font><font class="c_2">,</font><font class="c_1">superUser</font><font class="c_2">:</font><font class="c_4">true</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">roles</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">}</font><font class="c_2">,</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">103</font><font class="c_2">}</font><font class="c_2">]</font><font class="c_2">}</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">105</font><font class="c_2">,</font> <font class="c_1">companyID</font><font class="c_2">:</font><font class="c_1">131</font><font class="c_2">,</font>
			 <font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">&quot;Nick&quot;</font><font class="c_2">,</font> <font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">&quot;Martin&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">address</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">city</font><font class="c_2">:</font><font class="c_3">&quot;Albany&quot;</font><font class="c_2">,</font><font class="c_1">state</font><font class="c_2">:</font><font class="c_3">&quot;NY&quot;</font><font class="c_2">,</font><font class="c_1">zipCode</font><font class="c_2">:</font><font class="c_3">&quot;14410-585&quot;</font><font class="c_2">,</font><font class="c_1">addreess</font><font class="c_2">:</font><font class="c_3">&quot;41 State Street&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">job</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">departmentID</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font><font class="c_1">jobTitleID</font><font class="c_2">:</font><font class="c_1">100</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">contact</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">&quot;12-123-2133&quot;</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">&quot;5656&quot;</font><font class="c_2">,</font> <font class="c_1">email</font><font class="c_2">:</font><font class="c_3">&quot;nick@yahoo.com&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">login</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">employeeID</font><font class="c_2">:</font><font class="c_3">&quot;eID103&quot;</font><font class="c_2">,</font><font class="c_1">password</font><font class="c_2">:</font><font class="c_3">&quot;password&quot;</font><font class="c_2">,</font><font class="c_1">superUser</font><font class="c_2">:</font><font class="c_4">true</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">roles</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">}</font><font class="c_2">,</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">103</font><font class="c_2">}</font><font class="c_2">]</font><font class="c_2">}</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">106</font><font class="c_2">,</font> <font class="c_1">companyID</font><font class="c_2">:</font><font class="c_1">131</font><font class="c_2">,</font>
			 <font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">&quot;John&quot;</font><font class="c_2">,</font> <font class="c_1">middleInitial</font><font class="c_2">:</font><font class="c_3">&quot;Jr&quot;</font><font class="c_2">,</font><font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">&quot;Smith&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">address</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">city</font><font class="c_2">:</font><font class="c_3">&quot;Albany&quot;</font><font class="c_2">,</font><font class="c_1">state</font><font class="c_2">:</font><font class="c_3">&quot;NY&quot;</font><font class="c_2">,</font><font class="c_1">zipCode</font><font class="c_2">:</font><font class="c_3">&quot;14410-585&quot;</font><font class="c_2">,</font><font class="c_1">addreess</font><font class="c_2">:</font><font class="c_3">&quot;41 State Street&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">job</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">departmentID</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font><font class="c_1">jobTitleID</font><font class="c_2">:</font><font class="c_1">100</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">contact</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">&quot;12-123-2133&quot;</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">&quot;5656&quot;</font><font class="c_2">,</font> <font class="c_1">email</font><font class="c_2">:</font><font class="c_3">&quot;john@yahoo.com&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">login</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">employeeID</font><font class="c_2">:</font><font class="c_3">&quot;eID104&quot;</font><font class="c_2">,</font><font class="c_1">password</font><font class="c_2">:</font><font class="c_3">&quot;password&quot;</font><font class="c_2">,</font><font class="c_1">superUser</font><font class="c_2">:</font><font class="c_4">true</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font> <font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">1106</font><font class="c_2">,</font> <font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">&quot;Maxime&quot;</font><font class="c_2">,</font> <font class="c_1">middleInitial</font><font class="c_2">:</font><font class="c_3">&quot;De&quot;</font><font class="c_2">,</font><font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">&quot;Lux&quot;</font><font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">roles</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">}</font><font class="c_2">,</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">103</font><font class="c_2">}</font><font class="c_2">]</font><font class="c_2">}</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_2">{</font><font class="c_1">employee</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">gid</font><font class="c_2">:</font><font class="c_1">107</font><font class="c_2">,</font> <font class="c_1">companyID</font><font class="c_2">:</font><font class="c_1">131</font><font class="c_2">,</font> <font class="c_1">defaultActionID</font><font class="c_2">:</font><font class="c_1">444</font><font class="c_2">,</font>
			 <font class="c_1">names</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">firstName</font><font class="c_2">:</font><font class="c_3">&quot;Mark&quot;</font><font class="c_2">,</font> <font class="c_1">lastName</font><font class="c_2">:</font><font class="c_3">&quot;Martin&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">address</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">city</font><font class="c_2">:</font><font class="c_3">&quot;Albany&quot;</font><font class="c_2">,</font><font class="c_1">state</font><font class="c_2">:</font><font class="c_3">&quot;NY&quot;</font><font class="c_2">,</font><font class="c_1">zipCode</font><font class="c_2">:</font><font class="c_3">&quot;14410-585&quot;</font><font class="c_2">,</font><font class="c_1">addreess</font><font class="c_2">:</font><font class="c_3">&quot;41 State Street&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">job</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">departmentID</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">,</font><font class="c_1">jobTitleID</font><font class="c_2">:</font><font class="c_1">100</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">contact</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">&quot;12-123-2133&quot;</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">&quot;5656&quot;</font><font class="c_2">,</font> <font class="c_1">email</font><font class="c_2">:</font><font class="c_3">&quot;mark.com&quot;</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">login</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">employeeID</font><font class="c_2">:</font><font class="c_3">&quot;eID105&quot;</font><font class="c_2">,</font><font class="c_1">password</font><font class="c_2">:</font><font class="c_3">&quot;password&quot;</font><font class="c_2">,</font><font class="c_1">superUser</font><font class="c_2">:</font><font class="c_4">true</font><font class="c_2">}</font><font class="c_2">,</font>
			 <font class="c_1">roles</font><font class="c_2">:</font><font class="c_2">[</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">102</font><font class="c_2">}</font><font class="c_2">,</font><font class="c_2">{</font><font class="c_1">role</font><font class="c_2">:</font><font class="c_1">105</font><font class="c_2">}</font><font class="c_2">]</font><font class="c_2">}</font><font class="c_2">}</font>
			 <font class="c_2">]</font><font class="c_2">}</font><font class="c_2">;</font></pre>

		   <pre><font class="c_4">var</font> <font class="c_1">contact</font> <font class="c_2">=</font><font class="c_2">{</font><font class="c_1">phoneHome</font><font class="c_2">:</font><font class="c_3">&quot;999-999-99&quot;</font><font class="c_2">,</font> <font class="c_1">beeper</font><font class="c_2">:</font><font class="c_3">&quot;979&quot;</font><font class="c_2">,</font> <font class="c_1">email1</font><font class="c_2">:</font><font class="c_3">&quot;john@unknown.net&quot;</font><font class="c_2">}</font><font class="c_2">;</font></pre>

	    </div>
	   </td>
	 </tr>
	 <tr>
	   <td class="code_subheader">Lookup JSON nodes:</td>
	 </tr>
	 <tr>
	 <td>
	 <a name="lookup"></a>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up all employees:
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( jTools.lookupAll(items, "*employee"), true, {"[*]":"employee"}))'>
						 jTools.lookupAll(items,"*employee")
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up all employees with gid=104:
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( jTools.lookupAll(items, "*employee", {"gid":104}), true, {"[*]":"employee"}))'>
						 jTools.lookupAll(items,"*employee", {"gid":104})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up all employees with first name starts with "M":
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( jTools.lookupAll(items, "*employee", {"names.firstName":/^M/}), true, {"[*]":"employee"}))'>
						    jTools.lookupAll(items,"*employee", {"names.firstName":/^M/})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up all employees whose child of "items" and first name starts with "M":
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( jTools.lookupAll(items, "items[*].employee", {"names.firstName":/^M/}), true, {"[*]":"employee"}))'>
						    jTools.lookupAll(items, "items[*].employee", {"names.firstName":/^M/})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up all employees whose first name starts with "M" and beeper equals "56":
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( jTools.lookupAll(items, "*employee", {"names.firstName":/^M/, "contact.beeper":"56"}), true, {"[*]":"employee"}))'>
						   jTools.lookupAll(items, "*employee", {"names.firstName":/^M/, "contact.beeper":"56"})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up all employee with correct email:
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( jTools.lookupAll(items, "*employee", {"contact.email":/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/}), true, {"[*]":"employee"}))'>
						   jTools.lookupAll(items, "*employee", {"contact.email":/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Looks up the first employee whose first name starts with "M":
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link"
					    href='javascript:alert(jTools.jsonToXML( wrapResult(jTools.lookupFirst(items, "*employee", {"names.firstName":/^M/})), true))'>
						   jTools.lookupFirst(items,"*employee", {"names.firstName":/^M/})
					  </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Gets count of employees whose first name starts with "M":
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link" href='javascript:alert( jTools.getCount(items, "*employee", {"names.firstName":/^M/}) )'>
						   jTools.getCount(items, "*employee", {"names.firstName":/^M/})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <table>
		 <tr>
			 <td class="code_legend">
				 Could you find employees that are not a super user?
			 </td>
			 <td>
				 <div class="code_link_holder">
					 <a class="code_link" href='javascript:alert( jTools.isContains(items, "*employee.login", {"superUser":/^f/}) )'>
						  jTools.isContains(items, "*employee.login", {"superUser":/^f/})
					 </a>
				 </div>
			 </td>
		 </tr>
	 </table>
	 <a name="lookupEnd"></a>
	 <table>
		 <tr>
			 <td class="code_legend_speed">
				 Do you worry about lookup performance?
			 </td>
			 <td>
				 <div class="code_link_speed_holder">
					 <a class="code_link_speed" href='javascript:alert(testLookup())'><b>Test it: </b>jTools.lookupAll(items, "items[*].employee", {"names.firstName":/^M/})</a>
			   </div>
			 </td>
		 </tr>
	 </table>
	 </td>
	 </tr>

	 <tr>
	  <td class="code_subheader">JSONER basics</td>
	 </tr>
		<tr>
	  <td>
		 <a name="base"></a>
		 <a name="toMap"></a>
	   <table>
			<tr>
			 <td class="code_legend">
				 Converts an array of JSON objects to Map:
			 </td>
			 <td>
				<div class="code_link_holder">
					<a class="code_link" href='javascript:alert(jTools.jsonToXML(jTools.jsonToMap(companies.companies,"value", "text"), true))'>
					var corpMap = jTools.jsonToMap(companies.companies,"value", "text");
				 </a>
				</div>
			 </td>
			</tr>
		 </table>
		 <a name="toMapEnd"></a>
		 <table>
			<tr>
			 <td class="code_legend">
				 Clones a JSON:
			 </td>
			 <td>
				<div class="code_link_holder">
					<a class="code_link" href="javascript:alert(jTools.jsonToXML(jTools.clone(json), true))">
		       jTools.clone(json)
					</a>
				</div>
			 </td>
			</tr>
	    <tr>
			 <td class="code_legend">
				 Clones an array:
			 </td>
			 <td>
				<div class="code_link_holder">
					 <a class="code_link" href="javascript:alert(jTools.jsonToXML(jTools.clone(companies), true))">
				    jTools.clone(companies)
					</a>
				</div>
			 </td>
		  </tr>
			<tr>
				<td class="code_legend">
					Clones a map:
				</td>
				<td>
				<div class="code_link_holder">
					<a class="code_link" href="javascript:alert(jTools.jsonToXML(jTools.clone(corpMap), true))">
					 jTools.clone(corpMap)
				  </a>
				</div>
			 </td>
			</tr>
		 </table>
		 <table>
			<tr>
			 <td class="code_legend">
				 Merges JSONs:
			 </td>
			 <td>
				<div class="code_link_holder">
					 <a class="code_link" href="javascript:alert(jTools.jsonToXML(jTools.merge(json, json2), true))">
		        jTools.merge(json, json2)
					 </a>
			   </div>
			 </td>
			</tr>
		 </table>
		 <table>
			<tr>
			 <td class="code_legend">
				 Gets difference:
			 </td>
			 <td>
				<div class="code_link_holder">
					 <a class="code_link" href="javascript:alert(jTools.jsonToPathValue(jTools.getDifference(json, json3)))">
						  jTools.getDifference(json, json3);
					 </a>
			   </div>
			 </td>
			</tr>
		 </table>
		 <table>
			<tr>
			 <td class="code_legend">
				 Tests that getDifference is contrary to getMerge:
			 </td>
			 <td>
				<div class="code_link_holder">
					 <a class="code_link" href="javascript:alert(jTools.isEquals(json, jTools.merge(json3, jTools.getDifference(json, json3))))">
	            var dif = jTools.getDifference(json, json3);<br>
	            jTools.isEquals(json, jTools.merge(json3, dif));<br>
					 </a>
			   </div>
			 </td>
			</tr>
		 </table>

		<a name="compare"></a>
	  <table>
			<tr>
			 <td class="code_legend">
				 Compares JSONs:
			 </td>
			 <td>
				<div class="code_link_holder">
					 <a class="code_link" href='javascript:alert(jTools.isEquals(jTools.clone(json), json))'>
				    jTools.isEquals(jTools.clone(json), json)
				  </a>
			  </div>
			 </td>
			</tr>
			<tr>
			 <td class="code_legend">
				 Compares JSONs:
			 </td>
			 <td>
				<div class="code_link_holder">
					 <a class="code_link" href='javascript:alert(jTools.isEquals(jTools.setValue(jTools.clone(json), "employee.contact.fax2", "63-334"), json))'>
				    jTools.isEquals( jTools.setValue(jTools.clone(json), "employee.contact.fax2", "63-334") , json)
				  </a>
			  </div>
			 </td>
			</tr>
		 </table>
		  <a name="compareEnd"></a>
		  <a name="baseEnd"></a>
	  </td>
	 </tr>

	 <tr>
	   <td class="code_subheader">Representation of JSON by XML</td>
	 </tr>
	 <tr>
	  <td>
		   <a name="toXml"></a>
		   <table>
			   <tr>
				  <td class="code_legend">
						Pretty prints JSON to XML:
				  </td>
				  <td>
						 <div class="code_link_holder">
							 <a class="code_link" href="javascript:alert(jTools.jsonToXML(json, true))">jTools.jsonToXML(json, true)</a>
					  </div>
				  </td>
				  </tr>
					<tr>
				   <td class="code_legend">
						 Compact outputs:
				   </td>
				   <td>
						 <div class="code_link_holder">
							 <a class="code_link" href="javascript:alert(jTools.jsonToXML(json))">jTools.jsonToXML(json)</a>
						 </div>
				   </td>
				 </tr>
		   </table>
		  <table>
			  <tr>
				 <td class="code_legend">
					 Transforms node names and attribute values:
				 </td>
				 <td>
					 <div class="code_link_holder">
						  <a class="code_link" href='javascript:alert(jTools.jsonToXML(json, true, {employee:"user", names:"initials"}, null, {password:"****"}))'>
					     jTools.jsonToXML(json, true, {employee:"user", names:"initials"}, null, {password:"****"})
					    </a>
			      </div>
				 </td>
				</tr>
		  </table>
	    <table>
			  <tr>
				 <td class="code_legend">
					 Changes JSON attribute rule, outputs XML structure:
				 </td>
				 <td>
						<div class="code_link_holder">
							<a class="code_link" href='javascript:alert( getXMLRepresentatiion() )'>
	            jTools.jsonToXML(json, true);
						</a>
					 </div>
				 </td>
				</tr>
		  </table>
	    <table>
			  <tr>
				 <td class="code_legend">
					 Expands compainesID and departmentID by map, transforms attributes:
				 </td>
				 <td>
					<div class="code_link_holder">
						<a class="code_link" href='javascript:alert(jTools.jsonToXML(json, true, null, {"companyID":"company", "departmentID":"department"}, atrConverter))'>
							jTools.jsonToXML(json, true, null, null, atrConverter);
					  </a>
				  </div>
				 </td>
				</tr>
		  </table>
		  <a name="toXmlEnd"></a>
	  </td>
	 </tr>

	 <tr>
	   <td class="code_subheader">Representation of JSON by Path-Value</td>
	 </tr>
	 <tr>
	  <td>
		  <a name="topath"></a>
		  <table>
			  <tr>
				 <td class="code_legend">
					 Represents JSON as name-value pairs:
				 </td>
				 <td>
						<div class="code_link_holder">
							<a class="code_link" href="javascript:alert(jTools.jsonToPathValue(json))">jTools.jsonToPathValue(json)</a>
						</div>
				 </td>
				</tr>
		  </table>
	     <table>
			  <tr>
				 <td class="code_legend">
					 Changes JSON attribute rule, represents JSON as name-value pairs:
				 </td>
				 <td>
					 <div class="code_link_holder">
						 <a class="code_link" href="javascript:alert( getNameValueRepresentation() )">
						 jTools.jsonToPathValue(json)
					  </a>
					 </div>
				 </td>
				</tr>
		  </table>
	  </td>
	 </tr>

	 <tr>
	   <td class="code_subheader">Capturing a JSON property value</td>
	 </tr>
	 <tr>
	  <td>
		  <a name="capture"></a>
		   <table>
			  <tr>
				 <td class="code_legend">
					 Captures a property:
				 </td>
				 <td>
					 <div class="code_link_holder">
						 <a class="code_link" href='javascript:alert(jTools.getValue(json, "employee.companyID"))'>
		         jTools.getValue(json, "employee.companyID")
						</a>
					</div>
				 </td>
				 </tr>
	       <tr>
	        <td class="code_legend">
					 Captures a property:
				  </td>
				  <td>
					  <div class="code_link_holder">
						  <a class="code_link" href='javascript:alert(jTools.getValue(json, "employee.roles[0].role"))'>
							  jTools.getValue(json, "employee.roles[0].role")
						  </a>
					  </div>
				  </td>
			  </tr>
		  </table>
		   <table>
			  <tr>
				 <td class="code_legend">
					 Captures a property. Note: paymentInfo not found until set employee.paymentInfo.number called
				 </td>
				  <td>
					  <div class="code_link_holder">
						  <a class="code_link" href='javascript:alert(jTools.getValue(json, "employee.paymentInfo.number"))'>
							  jTools.getValue(json, "employee.paymentInfo.number")
						  </a>
					  </div>
				  </td>
			  </tr>
		  </table>
		  <a name="captureEnd"></a>
			<table>
			  <tr>
				 <td class="code_legend_speed">
					 Do you worry about performance?
				 </td>
				 <td>
					 <div class="code_link_speed_holder">
						 <a class="code_link_speed" href='javascript:alert(testGet());'><b>Test it: </b>jTools.getValue(json,
							 "employee.roles[0].role")</a>
					 </div>
				 </td>
			  </tr>
		  </table>
	  </td>
	 </tr>

	 <tr>
	  <td class="code_subheader">Assigment a value to JSON property</td>
	 </tr>
	 <tr>
	  <td>
		 <a name="assign"></a>
	   <table>
			  <tr>
				 <td class="code_legend">
					 Assigns a value:
				 </td>
				 <td>
					 <div class="code_link_holder">
						 <a class="code_link"
						    href='javascript:alert(jTools.getValue( jTools.setValue(json, "employee.companyID", "512"), "employee.companyID"))'>
							 jTools.setValue(json, "employee.companyID", "512")
						 </a>
					 </div>
				 </td>
				</tr>
	  </table>
	 <table>
		<tr>
		 <td class="code_legend">
			 Assigns a value, creates missing data:
		 </td>
			<td>
				<div class="code_link_holder">
					<a class="code_link"
					   href='javascript:alert(jTools.getValue( jTools.setValue(json, "employee.paymentInfo.number", "512-3443-34554"), "employee.paymentInfo.number"))'>
						jTools.setValue(json, "employee.paymentInfo.number", "512-3443-34554")
					</a>
				</div>
			</td>
	  </tr>
		<tr>
			<td class="code_legend">
			 Assigns a value, creates missing data:
		 </td>
		  <td>
				<div class="code_link_holder">
					<a class="code_link"
					   href='javascript:alert(jTools.getValue(jTools.setValue(json, "employee.roles[2].role", "109"), "employee.roles[2].role"))'>
						jTools.setValue(json, "employee.roles[2].role", "109")
					</a>
				</div>
		 </td>
		</tr>
	 </table>
	 <table>
		<tr>
		 <td class="code_legend">
			 Assigns a value. Note: paymentInfo can't be found until set value is called.
		 </td>
			<td>
				<div class="code_link_holder">
					<a class="code_link"
					   href='javascript:alert(jTools.getValue( jTools.setValue(json, "employee.paymentInfo.date", "02/02/2007", false), "employee.paymentInfo.date"))'>
						jTools.setValue(json, "employee.paymentInfo.date", "02/02/2007", false)
					</a>
				</div>
			</td>
		</tr>
	 </table>
	  <a name="assignEnd"></a>
		<table>
			<tr>
			 <td class="code_legend_speed">
				 Do you worry about performance?
			 </td>
				<td>
					<div class="code_link_speed_holder">
						<a class="code_link_speed" href='javascript:alert(testSet())'><b>Test it: </b>Tools.setValue(json,
							"employee.roles[" +i + "'].role", i)</a>
					</div>
				</td>
			</tr>
		</table>
	  </td>
	 </tr>

   <tr>
	   <td class="code_subheader">JSONER cross-link resolver</td>
	 </tr>
	 <tr>
	  <td>
		 <a name="binding"></a>
	   <table>
			  <tr>
				 <td class="code_legend">
					 Adds cross-link:
				 </td>
				  <td>
					  <div class="code_link_holder">
						  <a class="code_link" href='javascript:addCrossLink()'>
							  json.employee.names.crosslink = json.employee;<br>
							  json.employee.address.crosslink = json.employee.address;
						  </a>
					  </div>
				  </td>
			  </tr>
		   <tr>
			  <td class="code_legend">
					Pretty prints JSON to XML:
			  </td>
			  <td>
					 <div class="code_link_holder">
						 <a class="code_link" href="javascript:alert(jTools.jsonToXML(json, true))">jTools.jsonToXML(json, true)</a>
				  </div>
			  </td>
			 </tr>
	  </table>
	 </td>
	</tr>

	 <tr>
	  <td class="code_subheader">JSON data binding core</td>
	 </tr>
	 <tr>
	  <td>
		 <a name="binding"></a>
	   <table>
			  <tr>
				 <td class="code_legend">
					 Gets array of employee children (alert length):
				 </td>
				  <td>
					  <div class="code_link_holder">
						  <a class="code_link" href='javascript:alert(jTools.getChildren(json, "employee").length)'>
							  jTools.getChildren(json, "employee");
						  </a>
					  </div>
				  </td>
			  </tr>
	  </table>
		<table>
			  <tr>
				 <td class="code_legend">
					 Gets the first child of the JSON node:
				 </td>
				  <td>
					  <div class="code_link_holder">
						  <a class="code_link"
						     href='javascript:alert(jTools.jsonToXML(jTools.getFirstChild(json, "employee"), true))'>
							  jTools.getFirstChild(json, "employee");
						  </a>
					  </div>
				  </td>
			  </tr>
	  </table>
	 <table>
		<tr>
		 <td class="code_legend">
			  Gets array of employee attributes (alert length):
		 </td>
			<td>
				<div class="code_link_holder">
					<a class="code_link" href='javascript:alert(jTools.getAttributes(json, "employee").length)'>
						jTools.getAttributes(json, "employee");
					</a>
				</div>
			</td>
		</tr>
	 </table>
		<table>
			<tr>
			 <td class="code_legend">
					Adds child node:
			 </td>
				<td>
					<div class="code_link_holder">
						<a class="code_link"
						   href='javascript:alert( jTools.jsonToXML(jTools.addChild(json, "employee.contact",contact ), true))'>
							jTools.addChild(json, "employee.contact", contact);
						</a>
					</div>
				</td>
			</tr>
		 </table>
		<table>
			<tr>
			 <td class="code_legend">
					Inserts child node:
			 </td>
				<td>
					<div class="code_link_holder">
						<a class="code_link"
						   href='javascript:alert( jTools.jsonToXML(jTools.addChild(json, "employee.roles", {role:101}, 0 ), true))'>
							jTools.addChild(json, "employee.role", {role:101}, 0 );
						</a>
					</div>
				</td>
			</tr>
		 </table>
		<table>
			<tr>
			 <td class="code_legend">
					Removes children:
			 </td>
				<td>
					<div class="code_link_holder">
						<a class="code_link"
						   href='javascript:alert( jTools.jsonToXML(jTools.removeChildren(json, "employee.contact"), true))'>
							jTools.removeChildren(json, "employee.contact");
						</a>
					</div>
				</td>
			</tr>
		 </table>
		<table>
			<tr>
			 <td class="code_legend">
					Remove child: Note: "contact" node not found until addChild called
			 </td>
				<td>
					<div class="code_link_holder">
						<a class="code_link"
						   href='javascript:alert( jTools.jsonToXML(jTools.removeChild(json, "employee.contact", contact), true))'>
							jTools.removeChild(json, "employee.contact", contact);
						</a>
					</div>
				</td>
			</tr>
		 </table>
		 <a name="bindingEnd"></a>
	 </td>
	 </tr>

	 <tr>
	  <td class="code_subheader">Work with Form by JSONER</td>
	 </tr>
	 <tr>
	   <td>
		   <div class="listcontainer">
			   <ul>
				   <li>
					   <a href="javascript:showSnip('code_data_2')">Defines a set of patterns and JSON representation of EOL:</a>
		       </li>
				  </ul>
	     </div>
		   <div id="code_data_2" class="code_data">
	<pre><font class="c_4">var</font> <font class="c_1">jPattern</font> <font class="c_2">=</font>  <font class="c_2">{</font> <font class="c_3">&quot;employee.gid&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">span</font><font class="c_2">:</font><font class="c_4">null</font><font class="c_2">,</font> <font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;type&quot;</font><font class="c_2">:</font><font class="c_3">&quot;hidden&quot;</font><font class="c_2">}</font><font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;employee.names.firstName&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">size</font><font class="c_2">:</font><font class="c_3">&quot;20&quot;</font><font class="c_2">}</font> <font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;employee.names.middleInitial&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">size</font><font class="c_2">:</font><font class="c_3">&quot;5&quot;</font><font class="c_2">}</font> <font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;employee.companyID&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">span</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Company:&quot;</font><font class="c_2">}</font><font class="c_2">,</font> <font class="c_1">input</font><font class="c_2">:</font><font class="c_4">null</font><font class="c_2">,</font> <font class="c_3">&quot;select&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;class&quot;</font><font class="c_2">:</font><font class="c_3">&quot;json_input&quot;</font><font class="c_2">,</font> <font class="c_1">option</font><font class="c_2">:</font><font class="c_1">companies</font><font class="c_2">.</font><font class="c_1">companies</font><font class="c_2">}</font> <font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;employee.job.departmentID&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">span</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">text</font><font class="c_2">:</font><font class="c_3">&quot;Department:&quot;</font><font class="c_2">}</font><font class="c_2">,</font> <font class="c_1">input</font><font class="c_2">:</font><font class="c_4">null</font><font class="c_2">,</font> <font class="c_3">&quot;select&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;class&quot;</font><font class="c_2">:</font><font class="c_3">&quot;json_input&quot;</font><font class="c_2">,</font> <font class="c_1">option</font><font class="c_2">:</font><font class="c_1">departments</font><font class="c_2">.</font><font class="c_1">departments</font><font class="c_2">}</font> <font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;employee.login.password&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;type&quot;</font><font class="c_2">:</font><font class="c_3">&quot;password&quot;</font><font class="c_2">,</font> <font class="c_1">size</font><font class="c_2">:</font><font class="c_3">&quot;40&quot;</font><font class="c_2">}</font> <font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;number&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;type&quot;</font><font class="c_2">:</font><font class="c_3">&quot;text&quot;</font><font class="c_2">,</font> <font class="c_1">size</font><font class="c_2">:</font><font class="c_3">&quot;6&quot;</font><font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;boolean&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;type&quot;</font><font class="c_2">:</font><font class="c_3">&quot;checkbox&quot;</font><font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;CDATA&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font> <font class="c_1">input</font><font class="c_2">:</font><font class="c_4">null</font><font class="c_2">,</font> <font class="c_1">textarea</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;class&quot;</font><font class="c_2">:</font><font class="c_3">&quot;json_input&quot;</font><font class="c_2">,</font> <font class="c_1">rows</font><font class="c_2">:</font><font class="c_3">&quot;3&quot;</font><font class="c_2">,</font> <font class="c_1">cols</font><font class="c_2">:</font><font class="c_3">&quot;50&quot;</font><font class="c_2">}</font> <font class="c_2">}</font><font class="c_2">}</font><font class="c_2">,</font>
	     <font class="c_3">&quot;default&quot;</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">span</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;class&quot;</font><font class="c_2">:</font><font class="c_3">&quot;json_label&quot;</font><font class="c_2">}</font><font class="c_2">,</font> <font class="c_1">input</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_3">&quot;class&quot;</font><font class="c_2">:</font><font class="c_3">&quot;json_input&quot;</font><font class="c_2">,</font> <font class="c_3">&quot;type&quot;</font><font class="c_2">:</font><font class="c_3">&quot;text&quot;</font><font class="c_2">,</font> <font class="c_1">size</font><font class="c_2">:</font><font class="c_3">&quot;40&quot;</font><font class="c_2">}</font><font class="c_2">,</font> <font class="c_1">style</font><font class="c_2">:</font><font class="c_3">&quot;float:left;&quot;</font> <font class="c_2">}</font><font class="c_2">}</font><font class="c_2">}</font><font class="c_2">;</font></pre>

	<pre><font class="c_4">var</font> <font class="c_1">EOL</font> <font class="c_2">=</font> <font class="c_2">{</font><font class="c_1">div</font><font class="c_2">:</font><font class="c_2">{</font><font class="c_1">style</font><font class="c_2">:</font><font class="c_3">&quot;clear:both&quot;</font><font class="c_2">}</font><font class="c_2">}</font><font class="c_2">;</font></pre>
			</div>
	   </td>
	 </tr>
	 <tr>
	 <td>
		<a name="form"></a>
	<table>
		<tr>
		 <td class="code_legend">
			 Creates a HTML form by JSON model and Patterns.
		 </td>
		 <td>
			 <div class="code_link_holder">
				 <a class="code_link" href='javascript:prepareForm()'>Creates a Form (try to add paymentInfo before)</a>
			 </div>
		 </td>
		</tr>
	 </table>
	 <table>
		 <tr>
			<td class="code_legend">
				Checks changes:
			</td>
			<td>
				<div class="code_link_holder">
					<a class="code_link"
					   href='javascript:alert( !jTools.isEquals(json, jTools.populateFormToJson(document.getElementById("sample_form"), jTools.clone(json))))'>
						!jTools.isEquals(json, jTools.populateFormToJson(form, jTools.clone(json)))
					</a>
				</div>
			</td>
		 </tr>
		</table>
	  <table>
			<tr>
			 <td class="code_legend">
				 Populate HTML form data to JSON:
			 </td>
				<td>
					<div class="code_link_holder">
						<a class="code_link"
						   href='javascript:alert(jTools.jsonToXML(jTools.populateFormToJson(document.getElementById("sample_form"), json), true))'>
							jTools.jsonToXML(jTools.populateFormToJson(form, json), true)
						</a>
					</div>
				</td>
			</tr>
	 </table>

	 <a name="formEnd"></a><br>
		 <table>
			 <tr>
				 <td class="code_legend_speed">
					 Do you worry about form processing performance?
				 </td>
				 <td>
					 <div class="code_link_speed_holder">
						 <a class="code_link_speed" href='javascript:alert(testPopulate())'><b>Test it:</b>jTools.populateFormToJson(frm,
							 jTools.clone(json))</a>
					 </div>
				 </td>
			 </tr>
		 </table>
		 <div style="margin:20px;background:#ccffff; width:600px;">
		  <form action="#" id="sample_form"></form>
	  </div>		 
		</td>
	 </tr>
	</table>
	</div>
	<div class="navfooter">
			Here anyone can leave his comments and wishes.<br>
			Please submit bugs and feature ideas or patches to the
			email <a href="mailto:jsoner@soft-amis.com">jsoner@soft-amis.com</a>,
			and we&rsquo;ll get on it.
	</div>
</body>
</html>


